

class ArticleData {
  int? total;
  List<ArticleList>? list;

  ArticleData({this.total, this.list});

  ArticleData.fromJson(Map<String, dynamic> json) {
    if (json["total"] is int) {
      total = json["total"];
    }
    if (json["list"] is List) {
      list = json["list"] == null
          ? null
          : (json["list"] as List).map((e) => ArticleList.fromJson(e)).toList();
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["total"] = total;
    if (list != null) {
      _data["list"] = list?.map((e) => e.toJson()).toList();
    }
    return _data;
  }
}

class ArticleList {
  int? id;
  String? title;
  String? imgUrl;
  int? readCount;
  int? likesCount;
  int? collectCount;
  String? doctorNick;
  String? profilePhoto;
  int? tit;

  ArticleList(
      {this.id,
      this.title,
      this.imgUrl,
      this.readCount,
      this.likesCount,
      this.collectCount,
      this.doctorNick,
      this.profilePhoto,
      this.tit});

  ArticleList.fromJson(Map<String, dynamic> json) {
    if (json["id"] is int) {
      id = json["id"];
    }
    if (json["title"] is String) {
      title = json["title"];
    }
    if (json["imgUrl"] is String) {
      imgUrl = json["imgUrl"];
    }
    if (json["readCount"] is int) {
      readCount = json["readCount"];
    }
    if (json["likesCount"] is int) {
      likesCount = json["likesCount"];
    }
    if (json["collectCount"] is int) {
      collectCount = json["collectCount"];
    }
    if (json["doctorNick"] is String) {
      doctorNick = json["doctorNick"];
    }
    if (json["profilePhoto"] is String) {
      profilePhoto = json["profilePhoto"];
    }
    if (json["tit"] is int) {
      tit = json["tit"];
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["id"] = id;
    _data["title"] = title;
    _data["imgUrl"] = imgUrl;
    _data["readCount"] = readCount;
    _data["likesCount"] = likesCount;
    _data["collectCount"] = collectCount;
    _data["doctorNick"] = doctorNick;
    _data["profilePhoto"] = profilePhoto;
    _data["tit"] = tit;
    return _data;
  }
}
